package com.blb.article_ms.mapper;

import com.blb.article_ms.entity.Comment;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author xray
 * @since 2023-06-14
 */
public interface CommentMapper extends BaseMapper<Comment> {

    /**
     * 按文章id查询评论
     * @param articleId
     * @return
     */
    @Select("select * from t_comment where article_id = #{articleId}")
    List<Comment> selectCommentsByArticleId(Long articleId);
}
